package com.bgIntlgn.client.entity.jishubu.papaerLibary;

import java.util.Date;

import yuhuibear.poat.annotations.relation.View;
import yuhuibear.poat.object.bean.Bean;

@View(name = "pic_suite_detail", sqlToCreate = "select "
		+ "ps.*, e.name as name, s.spec as spec, e.type as type "
		+ "from pic_paper_suites as ps , elements as e, element_subversions as s "
		+ "where ps.uid = s.uid and s.element_id = e.id")
public class PicPaperSuiteDetail implements Bean {

	private Long id;

	/**
	 * 所属零件ID
	 */
	private String uid;

	/**
	 * 套图序号.
	 */
	private Date createDate;

	/**
	 * 是否在库中
	 */
	private boolean inLib;

	/**
	 * 备注
	 */
	private String comment;

	private String name;

	private String spec;

	private Long type;

	private boolean broken;

	public PicPaperSuite toPicSuite() {
		PicPaperSuite pps = new PicPaperSuite();
		pps.setInLib(inLib);
		pps.setComment(comment);
		pps.setUid(uid);
		pps.setCreateDate(createDate);
		pps.setId(id);
		pps.setBroken(broken);
		return pps;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public boolean isBroken() {
		return broken;
	}

	public void setBroken(boolean broken) {
		this.broken = broken;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public boolean isInLib() {
		return inLib;
	}

	public void setInLib(boolean inLib) {
		this.inLib = inLib;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSpec() {
		return spec;
	}

	public void setSpec(String spec) {
		this.spec = spec;
	}

	public Long getType() {
		return type;
	}

	public void setType(Long type) {
		this.type = type;
	}

}
